<?php
	session_start();
	if (!isset($_SESSION['keyword']) || !isset($_SESSION['url'])) {
		require('setup/file_txt.inc.php');
		$urls = getUrls('setup/url.ini');
		$_SESSION['urls'] = $urls;
	}

	if(isset($_GET['key'])){
		$key = $_GET['key'];
		if(isset($_SESSION['urls'][$key])){
			header("location:".$_SESSION['urls'][$key]);
			exit;
		} else {
			echo "<html><head><title>$title</title></head><body>关键词错误。</body></html>";
		}
	}else{
		echo "<html><head><title>$title</title></head><body>关键词错误。</body></html>";
	}
?>